package com.atguigu.hbase;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.hadoop.hbase.client.Table;

import java.io.IOException;

/**
 * @author yhm
 * @create 2023-02-09 18:10
 */
public class HBaseConnection {
    public static void main(String[] args) throws IOException {

//        Configuration conf = new Configuration();
        // 创建连接
        Connection connection = ConnectionFactory.createConnection();

        // TODO 使用连接
        System.out.println(connection);
        // DDL语言
        Admin admin = connection.getAdmin();
        // DML
//        Table table = connection.getTable();

        // 关闭连接
        connection.close();
    }
}
